package cn.kgm.user.dto.dto;

import cn.kgm.core.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * # 技术改变自己 #
 * 用户授信IP
 * @author kappi
 * @date   2024-04-08 13:28:48
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel(value = "UserIpUpdateDTO", description = "用户授信IP")
public class UserIpUpdateDTO extends Entity<Long> {

    /**
     * 用户登录IP
     */
    @ApiModelProperty(value = "用户登录IP", position = 2)
    @Size(max = 16, message = "用户登录IP长度不能超过16")
    @NotBlank(message = "用户登录IP不能为空")
    private String ip;

    /**
     * 授信:[0,未授信];[1,已授信]
     */
    @ApiModelProperty(value = "授信:[0,未授信];[1,已授信]", position = 3)
    @NotNull(message = "授信:[0,未授信];[1,已授信]不能为空")
    private Boolean trust;

}
